using System.IO;

namespace Lottery.Client.SL
{
    public class NewsData
    {
        public int ID { get; set; }
        public string AffichesTime { get; set; }
        public string AffichesTitle { get; set; }
        public string AffichesCount { get; set; }

        public static NewsData GetNewsDataInfos(BinaryReader br)
        {
            NewsData result;
            try
            {
                result = new NewsData
                {
                    ID = br.ReadInt32(),
                    AffichesTime = br.ReadString(),
                    AffichesTitle = br.ReadString(),
                    AffichesCount = br.ReadString()
                };
            }
            catch
            {
                result = null;
            }
            return result;
        }
    }
}